set hive.exec.dynamic.partition=true;            --  动态分区
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.max.dynamic.partitions=90;         --  每天生成 60 个分区
set hive.exec.max.dynamic.partitions.pernode=90; --  每天生成 60 个分区

insert overwrite table jms_dim.dim_ep_per_efficiency_dt
select
 id
 ,happen_date
 ,agent_code
 ,agent_name
 ,center_code
 ,center_name
 ,operate_num
 ,self_attendance
 ,self_no_attendance
 ,hourly_work_hours
 ,hourly_attendance
 ,epiboly_expenses
 ,other_epiboly_expenses
 ,monthly_labor_cost
 ,day_labor_cost
 ,hourly_workers
 ,epiboly_num
 ,other_epiboly_num
 ,total_epiboly_num
 ,per_efficiency
 ,all_efficiency
 ,happen_month
 ,remark
 ,status
 ,create_by
 ,create_by_code
 ,create_by_name
 ,create_time
 ,update_by
 ,update_by_code
 ,update_by_name
 ,update_time
 ,head_count
 ,all_effective_target
 ,self_operate_cost
 ,self_unoperate_cost
 ,hour_cost
 ,benefit
 ,predict_all_cost
 ,examine_single_target
 ,dt
from jms_ods.ep_per_efficiency
where dt= '{{ execution_date | cst_ds }}'
distribute by 1 ;